package cn.ito.zjgsu.utils.util;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class JSONUtils {
	public static void JSONReplace(Object obj ,String field,String yes,String no){
		System.out.println(JSON.toJSON(obj));
		boolean isfield = (boolean) ((JSONObject) obj).get(field);
		String sisfield = (isfield==true)?yes:no;
		((JSONObject) obj).remove(field);
		((JSONObject) obj).put(field,sisfield) ;
	}
}
